﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace control.Biz
{
    public class BizChiTietPhieuXuat
    {
        private BizSach sach;
        public BizSach Sach
        {
            get
            {
                if (sach == null)
                    sach = new BizSach();
                return sach;
            }
            set
            {
                sach = value;
            }
        }
        public string MaSach
        {
            get { return Sach.MaSach; }
        }
        public int IdSach
        {
            get { return Sach.IdSach; }
        }
        public string HinhSach
        {
            get { return Sach.Hinh; }
        }
        public string TenSach
        {
            get { return Sach.TenSach; }
        }
        public string GiaSach
        {
            get { return Sach.GiaSach.ToString(); }
        }
        public int TonKho
        {
            get 
            {
                int Input = IdSach;
                return BizTonKho.GetTonKhoOfSach(Input);
            }
        }
        public int SoLuong { get; set; }
        public double ThanhTien
        {
            get { return Sach.GiaSach * SoLuong; }
        }

    }
}
